<template>
  <section class="search">
    <HeaderTop title="搜索"/>
    <form class="search_form" action="#">
      <input type="search" name="search" placeholder="请输入商家或美食名称" class="search_input">
      <input type="submit" name="submit" class="search_submit">
    </form>
  </section>
</template>

<script>
  import HeaderTop from '../../components/HeaderTop/HeaderTop.vue'
  export default {
    components:{
      HeaderTop
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus">

  .search  //搜索
    width 100%
    .header
      background-color #02a774
      position fixed
      z-index 200
      left 0
      top 0
      width 100%
      height 45px
      .header_search
        position absolute /*绝对定位元素相对的元素是它最近的一个祖先,该祖先满足:position的值必须是:relative、absolute、fixed,若没有这样的祖先则相对于body进行定位*/
        left 15px
        top 50%
        transform translateY(-50%)
        width 20%
        height 50%
        .icon-sousuo
          font-size 25px
          color #fff
      .header_title
        position absolute
        top 50%
        left 50%
        transform translate(-50%, -50%)
        width 50%
        color #fff
        text-align center
        .header_title_text
          font-size 20px
          color #fff
          display block
      .header_login
        position absolute
        right 15px
        top 50%
        transform translateY(-50%)
        .header_login_text
          color #fff
          font-size 14px
    .search_form
      clearFix()
      margin-top 45px
      background-color #f2f2f2
      padding 12px 8px
      input
        height 35px
        padding 0 4px
        border-radius 2px
        font-weight bold
        outline none
        &.search_input  /*和input属于同一个级标签*/
          float left
          width 79%
          border 2px solid #c1c1c1
          font-size 14px
          color #333
          background-color #f2f2f2
        &.search_submit/*和input属于同一个级标签*/
          float right
          width 18%
          border 4px solid #02a774
          font-size 16px
          color #fff
          background-color #02a774
</style>
